const path = require('path')

function resolve (dir) {
  return path.join(__dirname, dir)
}
module.exports = {
  lintOnSave: true,
  chainWebpack: (config) => {
    config.resolve.alias
      .set('components', resolve('src/components'))
      .set('common', resolve('src/common'))
      .set('api', resolve('src/api'))
      .set('base', resolve('src/base'))
      // 这里只写了两个个，你可以自己再加，按这种格式.set('', resolve(''))
  }

  // devServer: {
  //   proxy: {
  //     '/api': {
  //       target: 'https://c.y.qq.com/',
  //       ws: true,
  //       changeOrigin: true,
  //       pathRewrite: {
  //         '^/api': ''
  //       },
  //       logLevel: 'debug'
  //     }
  //   }
  // }
}
